What is shepherds lemma?

Shepherd's lemma is a mathematical theorem used in optimization theory. It states that if a function f(x) is concave (or convex), then its second-order partial derivatives are non-positive (or non-negative). In other words, if the function is concave, then the curvature of the function decreases as we move away from the point of interest, and if the function is convex, then the curvature increases as we move away from the point of interest. This lemma is useful in optimization problems because it helps to identify whether a critical point is a local maximum or minimum. Additionally, this lemma can be used to prove the convexity or concavity of a function. Shepherd's lemma is named after Andrew Shepherd, who first published the result in 1949.